[IA64] add unw_init_from_interruption()
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 6 Jul 2006 16:23:34 +0000 (10:23 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 6 Jul 2006 16:23:34 +0000 (10:23 -0600)
From stock upstream unwind.c

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
[fixed patch to match upstream]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
xen/arch/ia64/linux-xen/unwind.c

index c8bc766b4f2754db1b77eb3ac979c6d98d8a9c70..168948ecc0f3766dbbec989a29adb5d964cb24d6 100644 (file)
@@ -2055,6 +2055,28 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t,
        STAT(unw.stat.api.init_time += ia64_get_itc() - start; local_irq_restore(flags));
 }
 
+void
+unw_init_from_interruption (struct unw_frame_info *info, struct task_struct *t,
+                           struct pt_regs *pt, struct switch_stack *sw)
+{
+       unsigned long sof;
+
+       init_frame_info(info, t, sw, pt->r12);
+       info->cfm_loc = &pt->cr_ifs;
+       info->unat_loc = &pt->ar_unat;
+       info->pfs_loc = &pt->ar_pfs;
+       sof = *info->cfm_loc & 0x7f;
+       info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->regstk.top, -sof);
+       info->ip = pt->cr_iip + ia64_psr(pt)->ri;
+       info->pt = (unsigned long) pt;
+       UNW_DPRINT(3, "unwind.%s:\n"
+                  "  bsp    0x%lx\n"
+                  "  sof    0x%lx\n"
+                  "  ip     0x%lx\n",
+                  __FUNCTION__, info->bsp, sof, info->ip);
+       find_save_locs(info);
+}
+
 void
 unw_init_frame_info (struct unw_frame_info *info, struct task_struct *t, struct switch_stack *sw)
 {